FastAPI Pydantic This code defines a FastAPI application that can create an item, where the item's name and price are submitted through a POST request. If the price is less than 1.0, a 400 error will be returned. FastAPI Web Service 2024-12-16 12:03:53 4 views
FastAPI Pydantic This code defines a FastAPI application with an endpoint to create new items. Users can send a JSON with the item name and price to the `/items/` endpoint to create new items. FastAPI API Endpoint 2024-12-16 11:27:53 3 views
FastAPI Pydantic This code creates a FastAPI application with a Pydantic-defined User model and a POST endpoint to receive user data. API endpoint creation 2024-12-07 16:23:19 5 views
FastAPI Pydantic This function creates a FastAPI application, defines a model `Item` for receiving JSON data, and creates a POST route to handle item creation requests. FastAPI Web Service 2024-12-07 16:17:28 4 views
FastAPI uvicorn This function creates a FastAPI application that provides an endpoint `/random-number`, which returns a random integer within a specified range. Web service 2024-12-07 16:09:22 4 views
Beanie motor-mongo This code creates an asynchronous MongoDB database using Beanie and provides a RESTful API to retrieve user information through the FastAPI framework. Function 2024-12-07 16:08:00 3 views
FastAPI Pydantic This function creates a FastAPI application and defines a POST route that accepts a Pydantic model containing the name and price of an item, and returns a JSON response with the same information. If the item price is invalid, it raises an HTTP exception. FastAPI application functions 2024-12-07 16:05:04 3 views
FastAPI Pydantic This function creates a FastAPI application that can accept JSON data containing item information and return the created item information. If the data validation fails, it will return an error message. FastAPI Web Framework 2024-12-07 15:40:04 3 views
FastAPI Pydantic This code uses the FastAPI framework to create a simple RESTful API to retrieve user information. It uses the Pydantic library to define a user model and runs the FastAPI application with uvicorn. Function 2024-11-30 16:24:06 3 views
FastAPI Pydantic This function uses the FastAPI framework to create a simple RESTful API to retrieve user information for a specified ID. If the user ID is invalid or does not exist, the function will return the corresponding HTTP error. API function 2024-11-30 15:54:27 3 views